home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr10 / sleek34.zip / SLEEK.DOC < prev    next >
Text File  |  1993-04-15  |  11KB  |  334 lines

  1.  
  2. SLEEK (SLK.EXE), a file-reformatting utility
  3. Version: 3.4
  4. Apr.11, 1993    (Easter)
  5.  
  6. SLEEK is Copyright 1991, 1993 by Lambert Klein
  7. P.O. Box 611
  8. Wayne MI  48184-611
  9. Voice telephone: (313) 326-1583
  10.  
  11. GEnie:       L.Klein1
  12. CompuServe:  72010,624
  13. Internet:    72010.624@compuserve.com
  14. AOL:         LKlein3990
  15.  
  16. Member, Association of Shareware Professionals
  17.  
  18. =======================================================
  19.  
  20.               ┌─────────┐
  21.         ┌─────┴───┐     │               (R)
  22.       ──│         │o    │──────────────────
  23.         │   ┌─────┴╨──┐ │  Association of
  24.         │   │         │─┘  Shareware
  25.         └───│    o    │    Professionals
  26.       ──────│    ║    │────────────────────
  27.             └────╨────┘    MEMBER
  28.  
  29. "This program is produced by a member of the Association of
  30. Shareware Professionals (ASP). ASP wants to make sure that
  31. the shareware principle works for you. If you are unable to
  32. resolve a shareware-related problem with an ASP member by
  33. contacting the member directly, ASP may be able to help. The
  34. ASP Ombudsman can help you resolve a dispute or problem with
  35. an ASP member, but does not provide technical support for
  36. members' products. Please write to the ASP Ombudsman at 545
  37. Grover Road Muskegon MI 49442 or send a Compuserve message
  38. via easyplex to ASP Ombudsman 70007,3536."
  39.  
  40. ============================================================
  41. SLK.EXE is shareware. If you try it out, find it useful and
  42. go on using it - please register it. Registration is only
  43. $10.00.
  44. ============================================================
  45.  
  46.         PURPOSE
  47.  
  48. SLEEK is a high-speed text reformatter. Its purpose is to
  49. alter the lengths of lines in plain-text files, such as
  50. those created by text editors like PC-Write or Qedit (or
  51. files saved "unformatted" - but with "hard" line endings
  52. within paragraphs - by word processing programs such as
  53. Microsoft Word).
  54.  
  55. ---------------------------------------------------------
  56. Documentation for SLEEK (SLK.EXE), v. 3.4.        Page 1
  57. (c) Copyright 1991, 1993 Lambert Klein
  58.  
  59.  
  60. The program is useful for reformatting text files with
  61. relatively short line lengths, perhaps (as with this file)
  62. because the writer assumed you'd be using a typical dot-
  63. matrix printer setup to print them. But if you're using, say,
  64. compressed mode for printing, you might prefer that the lines
  65. be longer (thereby saving some paper). SLEEK can help with
  66. this by increasing the line lengths to your specifications.
  67.  
  68.         WHAT IT DOES
  69.  
  70. You can tell SLEEK to format line lengths out to a specified
  71. column, from 10 to 60,000. If you do not specify any column
  72. width, SLEEK changes all paragraphs in a text file to a
  73. single long line (with exceptions as noted below).
  74.  
  75. The latter function is useful to people who must take text
  76. files containing many "hard" line breaks and import them
  77. into a desktop publishing (DTP) program or open them with a
  78. program like Microsoft Word. It is almost always desirable
  79. to allow DTP programs, or Word and others like it, to make
  80. their own decisions about line breaks. "Hard" returns inside
  81. paragraphs in typical plain-text files block automatic line-
  82. wrapping - a major pain in the neck for the DTP program
  83. user. The solution is often either tedious manual
  84. reformatting or multiple passes through the file with a
  85. search/replace program (or with a DTP program's search/
  86. replace routine).
  87.  
  88. SLEEK, which is written entirely in assembly language, does
  89. its work quickly. For example, on a RAM disk on a 486-33
  90. computer, SLEEK has been observed to process a 105K text
  91. file - removing ALL hard breaks within paragraphs - in less
  92. than one second (if it had been re-breaking lines to
  93. SPECIFIED lengths, it would probably have taken several
  94. seconds to process the file). (Of course, as they say: Your
  95. mileage may vary.)
  96.  
  97.         HOW IT WORKS
  98.  
  99. SLEEK first trims extra spaces from the ends of lines. Then,
  100. on any line to be merged with the one below it, the "newline
  101. character" at the end of the line (actually, a carriage
  102. return followed by a line feed) is removed and replaced by a
  103. single space.
  104.  
  105. Reformatting stops at the end of a paragraph - which, from
  106. SLEEK's point of view, occurs when there are two or more
  107. "newlines" in a row - and begins again at the top of the
  108. next paragraph. (SLEEK does not do anything to blank lines.)
  109.  
  110. ---------------------------------------------------------
  111. Documentation for SLEEK (SLK.EXE), v. 3.4.        Page 2
  112. (c) Copyright 1991, 1993 Lambert Klein
  113.  
  114.  
  115. Another exception: Reformatting does NOT occur on any lines
  116. that begin with one or more spaces OR tab characters. Thus,
  117. you can use leading spaces or tabs to help control how the
  118. output file will look. (See the examples later in this
  119. documentation.)
  120.  
  121. What about hyphens? Hyphens are used in a couple of
  122. different ways within plain-text files: to force-hyphenate
  123. words and/or to create simulated "EM" or "EN" dashes.
  124.  
  125. If SLEEK, in reformatting a text file, must join a line with
  126. the one below it, and if the first line ends with a hyphen
  127. followed by a space, the space will be RETAINED when the two
  128. lines are joined. This is to ensure that if the hyphen-
  129. followed-by-space is part of a dash - just like that - the
  130. same positioning of spaces and hyphen(s) will be retained in
  131. the output file.
  132.  
  133. On the other hand, if a line ends with a manually-
  134. hyphenated word (just like that), SLEEK will NOT add a space
  135. after the hyphen if the line is joined with the one below
  136. it - unless there is ALREADY a space to the right of the
  137. hyphen in the input file (which would normally be a mistake
  138. in a situation like that).
  139.  
  140. SLEEK will never force a break INSIDE a word, but if it is
  141. shortening lines: When it encounters a hyphenated word it
  142. will, if possible, break the word at the hyphen, leaving the
  143. hyphen on the upper line.
  144.  
  145.         PROGRAM SYNTAX
  146.  
  147. SLK d:\path\filename /nn
  148.  
  149. where:
  150.  
  151. "d:\path\" represents OPTIONAL path information to tell
  152. SLEEK the location of the file to be processed (the input
  153. file);
  154.  
  155. "filename" is the name of the input file; and
  156.  
  157. "/nn" is an OPTIONAL command-line "switch" telling SLEEK at
  158. what column to re-break the lines in the file. For example,
  159. "/50" would tell SLEEK to reformat the lines out to column
  160. 50. The "nn" value can be 0, or in a range from 10 to 60000.
  161.  
  162. If you use "/0," SLEEK will use its maximum line-length
  163. setting (60,000). If you completely OMIT the "/nn"
  164. information, you're also in effect telling SLEEK to use its
  165.  
  166. ---------------------------------------------------------
  167. Documentation for SLEEK (SLK.EXE), v. 3.4.        Page 3
  168. (c) Copyright 1991, 1993 Lambert Klein
  169.  
  170.  
  171. maximum line-length setting (in which case the effect is to
  172. make all paragraphs in the file into a single long line -
  173. unless they begin with one or more spaces or tabs, or unless
  174. they are longer than 60,000 characters - not too likely).
  175.  
  176. If you use a "/nn" setting of from 1 to 9, SLEEK will
  177. default to a setting of 10.
  178.  
  179. NOTE: The alternate command-line switch character (a hyphen)
  180.       is supported in this version of SLEEK.
  181.  
  182.         OUTPUT FILES
  183.  
  184. SLEEK never over-writes your original file. It creates an
  185. output file having the same "base" name as the input file,
  186. but with the extension ".SLK." Thus: INPUT.DOC --> INPUT.SLK.
  187.  
  188. If you include a path in the input file name, that path will
  189. also be used for the output file.
  190.  
  191. Thus:  D:\INPUT.DOC --> D:\INPUT.SLK, even if you are not
  192. logged onto D:\ at the time you give the SLEEK command.
  193.  
  194. CAUTION: The program will OVER-WRITE an existing .SLK file
  195.          without query. If you run SLEEK on a file called
  196.          INPUT.DOC twice: The second time around, the new
  197.          INPUT.SLK will replace the first.
  198.  
  199.          *NEVER* use for input a file whose extension is
  200.          ".SLK". The result is that you'll lose the input
  201.          file completely; it will be written back to disk
  202.          as a zero-length file.
  203.  
  204.         OTHER LIMITATIONS
  205.  
  206. The present version of SLK does not accept wildcards in the
  207. input file name.
  208.  
  209. Files whose line endings consist ONLY of a carriage-return
  210. character (as with text files written on a Macintosh) are
  211. not suitable as input files until you add a line feed to
  212. each carriage return. Files whose lines end with ONLY a
  213. line feed character (as with text files written on a Unix
  214. system) will be processed almost, but not quite, as
  215. described above (the results are not entirely predictable).
  216. For best results, ensure that all "newlines" are carriage-
  217. return/line-feed pairs.
  218.  
  219. NOTE: SLK.EXE *CAN* read past a CTRL-Z (end-of-file)
  220.       character in an input file. It will not remove the
  221.       CTRL-Z and will go on processing lines below it.
  222. ---------------------------------------------------------
  223. Documentation for SLEEK (SLK.EXE), v. 3.4.        Page 4
  224. (c) Copyright 1991, 1993 Lambert Klein
  225.  
  226.  
  227.         EXAMPLES
  228.  
  229. Suppose the input file (call it TEST.DOC) looks like this:
  230.  
  231. Line one.
  232. Line two.
  233. Line three.
  234. Line four.
  235.  
  236. Line five.
  237. Line six.
  238.  
  239. ... and you use this command line:
  240.  
  241.         SLK test.doc
  242.  
  243. (no line length specified) The output file, TEST.SLK, will
  244. look like this:
  245.  
  246. Line one. Line two. Line three. Line four.
  247.  
  248. Line five. Line six.
  249.  
  250. Suppose instead the input file looks like the output file
  251. shown immediately above, and you use this command line:
  252.  
  253.         SLK test.doc /31
  254.  
  255. The result is:
  256.  
  257. Line one. Line two. Line three.
  258. Line four.
  259.  
  260. Line five. Line six.
  261.  
  262. If the input file TEST.DOC looks like this:
  263.  
  264. Line one. Line two.
  265.   Line three.
  266.   Line four.
  267. Line five.
  268.   Line six.
  269. Line seven.
  270.  
  271. Line eight.
  272. Line nine.
  273.  
  274. ... and you give this command (again, with no line-length
  275. information):
  276.  
  277.         SLK test.doc
  278.  
  279. ... then the output file, TEST.SLK, looks like this:
  280. ---------------------------------------------------------
  281. Documentation for SLEEK (SLK.EXE), v. 3.4.        Page 5
  282. (c) Copyright 1991, 1993 Lambert Klein
  283.  
  284. Line one. Line two.
  285.   Line three.
  286.   Line four. Line five.
  287.   Line six. Line seven.
  288.  
  289.  Line eight. Line nine.
  290.  
  291. That illustrates how lines beginning with spaces are NOT
  292. merged with adjacent lines just above them and ARE merged
  293. with lines just below them - unless the lines below ALSO
  294. begin with one or more spaces.
  295.  
  296.  
  297. I hope you find SLEEK useful. If you have any comments,
  298. suggestions, bug reports, and so on, please send them to me
  299. at the address shown above. See the file PROGRAMS.TXT, also
  300. in the archive SLEEK.ZIP, for information on my other
  301. shareware, including PrintPlus, my menu-driven dot-matrix
  302. printer control program.
  303.  
  304.  
  305.  
  306.  
  307. You can now register Sleek on CompuServe. just:
  308.  
  309. Go SWREG
  310.  
  311. Program title:          SLEEK
  312. Registration ID:        814
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322. Any registered or trademarked product names mentioned in
  323. this documentation are the property of their respective
  324. owners or publishers.
  325.  
  326. (Documentation assistant: Mike Arst, Compuserve 70403,1337)
  327.  
  328.  
  329.  
  330. ---------------------------------------------------------
  331. Documentation for SLEEK (SLK.EXE), v. 3.4.        Page 6
  332. (c) Copyright 1991, 1993 Lambert Klein
  333.  
  334.